var http  = require('http');
// var options ={
// 	hostname: 'localhost',
// 	port: 8124,
// 	path: '/upload',
// 	method: 'POST',
// 	headers: {
// 		'Content-Type': 'application/x-www-form-urlencoded'
// 	}
// };
// var requset = http.request(options,function(res){});
// requset.write('hello word');
// requset.end('hello word end');
http.get('http://127.0.0.1:8124/', function (response) {
    var body = [];

    console.log(response.statusCode);
    console.log(response.headers);

    response.on('data', function (chunk) {
        body.push(chunk);
    });
    var url = require('url');
    response.on('end', function () {
        body = Buffer.concat(body);
        console.log(body.toString());
    });
});